feat: ember-client — native async RESP3 client library - #297
Merged
Conversation
standalone async client crate for connecting to an ember server over TCP or TLS, sending RESP3 commands, and reading responses. provides a clean public API (Client, ClientError, Frame) without coupling to CLI internals. TLS support is an optional feature (enabled by default) so embedded or server-side users can opt out of the rustls dependency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
adds
crates/ember-client/— a standalone async Rust client library for ember. gives Rust users a first-class, library-friendly way to connect to ember without depending on the CLI crate.Client::connect(host, port)for plain TCPClient::connect_tls(host, port, &TlsClientConfig)for TLS (feature-gated)client.send(&["SET", "k", "v"])as the primary API — takes&[&str]directlyclient.auth(password)for server authenticationclient.disconnect()for graceful shutdown (sends QUIT before closing)ember_protocol::types::Frameso callers don't need a direct ember-protocol dependencyTLS is an optional feature (
tls, enabled by default) backed by rustls and tokio-rustls. disabling it removes the rustls dependency entirely — useful for embedded or server-side contexts.what was tested
cargo build -p ember-clientcleancargo clippy -p ember-client -- -D warningsclean (zero warnings)cargo test -p ember-client— 2 doc-tests passdesign considerations
named
Clientrather thanConnectionto match standard library conventions. TLS/TCP split handled by apub(crate) Transportenum with manualAsyncRead/AsyncWritedelegation — no pin-project dependency. intentionally minimal: no connection pooling, no retry logic — those belong in a higher-level wrapper built on top.